package com.poixson.stopwatch;

import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerQuitEvent;

public class StopWatchPlayerListener implements Listener {


	@EventHandler(priority = EventPriority.NORMAL)
	public void onPlayerQuit(PlayerQuitEvent event) {
//		plugin.lastSignUse.remove(event.getPlayer().getName());
	}


	@EventHandler(priority = EventPriority.HIGHEST)
	public void onPlayerJoin(PlayerJoinEvent event) {
//		String player = event.getPlayer().getName();
//		// login code runs multi-threaded with a delay
//		if (player != null)
//			// run after 2 seconds
//			plugin.getServer().getScheduler().scheduleAsyncDelayedTask(plugin, new PlayerAlertTask(plugin, player), 2 * 20);
	}


	@EventHandler(priority = EventPriority.NORMAL)
	public void onPlayerInteract(PlayerInteractEvent event) {
//		// right click only
//		if (event.getAction() != Action.RIGHT_CLICK_BLOCK) return;
//		Block block = event.getClickedBlock();
//		// not a sign
//		if (block == null || block.getType() != Material.SIGN_POST)
//			if (block.getType() != Material.WALL_SIGN) return;
//		// it's a sign
//		Sign sign = (Sign) block.getState();
//		String[] lines = sign.getLines();
//		if (!lines[0].equals("[WebAuction+]")) return;

	}


}